#FROM bewithmeallmylife/mmaction2-runtime:1.0.0
FROM bewithmeallmylife/mmaction2-runtime-cuda-11.1.1:1.0.0

USER root
ENV LANGUAGE zh_CN:zh

WORKDIR /app/mmaction2

ENV FORCE_CUDA="1"
ADD checkpoints  checkpoints
ADD configs configs
ADD demo demo
ADD mmaction mmaction
ADD tests tests
ADD tools tools
ADD README.md README.md
ADD setup.cfg setup.cfg
ADD setup.py  setup.py
RUN python3 setup.py develop
#CMD ["/root/anaconda3/envs/python3.8/bin/python","demo/webcam_demo_spatiotemporal_det.py","--input-video","0","--config","configs/detection/ava/slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb.py","--checkpoint","checkpoints/slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb_20201217-16378594.pth","--det-config","demo/faster_rcnn_r50_fpn_2x_coco.py","--det-checkpoint","checkpoints/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth","--det-score-thr","0.9","--action-score-thr","0.5","--label-map","tools/data/ava/label_map.txt","--predict-stepsize","40","--output-fps","20","--show"]
#sudo docker build -t='bewithmeallmylife/mmaction2-app:1.0.0' .
#sudo docker build -t='bewithmeallmylife/mmaction2-app-cuda-11.1:1.0.0' .
#xhost local:root
#sudo docker run --net=host  --gpus '"device=0"' --privileged --rm -it -v /dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -u root bewithmeallmylife/mmaction2-app:1.0.0
#sudo docker run --net=host  --gpus '"device=0"' --privileged --rm -it -v /dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -u root bewithmeallmylife/mmaction2-app-cuda-11.1:1.0.0